﻿@{
    Layout = "~/Themes/CNet/Shared/_HomePage_Master.cshtml";
}
   <div class="search_main">
    <div class="search_attrs">
      <div class="attrs" id="propertyArea" style="display: block;">
		<div id="propertyList">   
        <div class="attri hover attr_mult attri_less">   
        <div class="attr_hd"><b>价格：</b></div>   
        <div class="attr_bd">
         <ul class="attr_list" id="sprice">
         <li><a href="###" class="font06" ref="0,0">所有价格</a></li>
         <li><a href="###" ref="0,10">10元以内</a></li>
         <li><a href="###" ref="10,15">10-15元</a></li>
         <li><a href="###" ref="15,30">15-30元</a></li>
         <li><a href="###" ref="30,0">30元以上</a></li>
         </ul>
         </div></div>
        <div class="attri hover attr_mult attri_less">   
        <div class="attr_hd"><b>数据统计排行：</b></div>   
        <div class="attr_bd">
         <ul class="attr_list" id="sorder">
         <li><a href="###"><span class="font06" ref="t">按照上传时间</span></a></li>
         <li><a href="###" ref="c">点击量评量</a></li>
         <li><a href="###" ref="tv">购买量</a></li>
         </ul>
         </div></div>
		</div> 
    </div>
    <div class="search_pr">
    <input type="hidden" value="" id="h_price"; />
    <input type="hidden" value="" id="h_order"; />
    <input type="hidden" value="@ViewBag.strWhere" id="h_name" />
    <input type="button" id="afg" value="查询"></input>
    @Html.Action("GetProductsByName", "Catalog", new { productName = ViewBag.strWhere })
    </div>
    <div class="search_pr">
     <div class="search_xq_top"><b>您可能感兴趣的：</b></div>
     @Html.Action("UserInterests", "Catalog", new { foodId = ViewBag.foodId })
    </div>
   </div>
   </div>
   <script type="text/javascript" language="javascript">
       $(document).ready(function () {
           $("#sprice a").click(function () {
               $("#sprice a").removeClass("font06");
               $(this).addClass("font06");
               $("#h_price").val($(this).attr("ref"))
           });
           $("#sorder a").click(function () {
               $("#sorder a").removeClass("font06");
               $(this).addClass("font06");
               $("#h_order").val($(this).attr("ref"))
           });
       });

       $("#afg").click(function () {
           //获取输入框中的值
           var p1 = $("#h_price").val();
           var p2 = $("#h_order").val();
           if (p1 != "" || p2 != "") {
               window.location.href = "/Home/Search?strWhere=" + escape($("#h_name").val()) + "&p=" + p1 + "&par=" + p2;
           }
       });
   </script>